const plugins = ["@vue/babel-plugin-transform-vue-jsx"];
// 生产环境移除console
if (process.env.NODE_ENV === "production") {
  plugins.push("transform-remove-console");
}
// plugins.push([
//   'component',
//   {
//     libraryName: 'element-ui',
//     styleLibraryName: 'theme-chalk'
//   }
// ])
var vant = ['import', {
  libraryName: 'vant',
  libraryDirectory: 'es',
  style: true
}, 'vant'];
plugins.push(vant);
module.exports = {
  plugins: plugins,
  presets: [
    [
      "@vue/app",
      {
        modules: false,
        targets: {
          browsers: [
            "> 1%",
            "last 2 versions",
            "not ie <= 8",
            "Android >= 4",
            "iOS >= 8"
          ]
        },
        polyfills: [
          'es6.promise',
          'es6.symbol'
         ],
        useBuiltIns: "entry",
      }
    ],

  ],
  ignore: ['sdk/**'],
};